package com.server.impl;
import com.dao.TeacherMapper;
import com.entity.Teacher;
import com.server. TeacherServer;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class TeacherServerImpl implements  TeacherServer {

    @Resource
    private TeacherMapper tdao;

    @Override
    public int add(Teacher teacher) {
        return tdao.insert(teacher);
    }

    @Override
    public int update(Teacher teacher) {
        return tdao.updateByPrimaryKeySelective(teacher);
    }

    @Override
    public int delete(int id) {
        return tdao.deleteByPrimaryKey(id);
    }

    @Override
    public List<Teacher> getAll(Map<String, Object> map) {
        return tdao.getAll(map);
    }

    @Override
    public List<Teacher> getTeacher1(Map<String, Object> map) {
        return tdao.getTeacher1(map);
    }

    @Override
    public List<Teacher> getTeacher2(Map<String, Object> map) {
        return tdao.getTeacher2(map);
    }

    @Override
    public Teacher quchongTeacher(Map<String, Object> acount) {
        return tdao.quchongTeacher(acount);
    }

    @Override
    public Teacher getById(int id) {
        return tdao.selectByPrimaryKey(id);
    }

    @Override
    public List<Teacher> getByPage(Map<String, Object> map) {
        return tdao.getByPage(map);
    }

    @Override
    public int getCount(Map<String, Object> map) {
        return tdao.getCount(map);
    }

    @Override
    public List<Teacher> select(Map<String, Object> map) {
        return tdao.select(map);
    }
}
